﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Alunos.aspx.cs" Inherits="SistemaAcademico.Pages.Alunos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
        <h1 class="page-title">
            <i class="icon-pushpin"></i>Usuários
        </h1>
        <div id="Div1" runat="server" class="widget">
            <div class="widget-header">
                <h3>Alunos</h3>
            </div>
            <div id="Div2" runat="server" class="widget-content">
                <div class="CSSTableGenerator">
                    <asp:GridView ID="grvAlunos" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="SqlDataAlunos">
                        <AlternatingRowStyle BorderStyle="None" />
                        <Columns>
                            <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True" SortExpression="Id" />
                            <asp:BoundField DataField="nmAluno" HeaderText="Nome" SortExpression="nmAluno" />
                            <asp:BoundField DataField="dsLogin" HeaderText="Login" SortExpression="dsLogin" />
                            <asp:BoundField DataField="cdCPF" HeaderText="CPF" SortExpression="cdCPF" />
                            <asp:BoundField DataField="dsEmail" HeaderText="Email" SortExpression="dsEmail" />
                            <asp:BoundField DataField="nmCurso" HeaderText="Curso" SortExpression="nmCurso" />
                            <asp:BoundField DataField="cdPeriodo" HeaderText="Período" SortExpression="cdPeriodo" />
                            <asp:BoundField DataField="dtInicio" HeaderText="Data de Ingresso" SortExpression="dtInicio" />
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataAlunos" runat="server" ConnectionString="<%$ ConnectionStrings:SATCCConnectionString %>" SelectCommand="SELECT AlunoSet.Id, AlunoSet.nmAluno, UserSet.dsLogin, AlunoSet.cdCPF, AlunoSet.dsEmail, CursoSet.nmCurso, TurmaSet.cdPeriodo, TurmaSet.dtInicio  FROM AlunoSet INNER JOIN TurmaSet ON AlunoSet.TurmaId = TurmaSet.Id INNER JOIN CursoSet ON TurmaSet.Curso_Id = CursoSet.Id INNER JOIN UserSet ON AlunoSet.User_Id = UserSet.Id"></asp:SqlDataSource>
                </div>
                <br />
                  <asp:Button ID="btnContinuar" CssClass="btn btn-primary btnSalvar" PostBackUrl="~/Pages/NovoUsuario.aspx" runat="server"
                        Text="Novo Aluno"  />
            </div>
        </div>
    </form>
</asp:Content>
